Skip to content

Conversation

@gordonwoodhull
Copy link
Contributor

@gordonwoodhull gordonwoodhull commented Jan 25, 2026

Closes #13954

Summary

  • Add comprehensive Typst book support using orange-book template by default
  • Replace ctheorems with theorion package for improved control over numbering (and themes)
  • Add theorem-appearance option for configurable theorem styling in Typst output
  • Bundle required Typst packages (theorion, fontawesome, showybox, octique) for offline builds

theorem-appearance Option

theorion has various themes, which can be selected with theorem-appearance:

format:
  typst:
    theorem-appearance: simple  # default
    # or: fancy, clouds, rainbow

Themes:

  • simple (default): Bold title with period, italic body - matches classic LaTeX style
  • fancy: Colored boxes using brand colors (primary/secondary/tertiary)
  • clouds: Rounded colored background boxes per theorem type
  • rainbow: Colored left border with colored title per theorem type

Status: almost ready to merge, will squash first.

@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Jan 25, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@gordonwoodhull gordonwoodhull changed the title Typst book support with theorem-appearance option Typst Books Jan 25, 2026
@gordonwoodhull gordonwoodhull marked this pull request as ready for review January 26, 2026 14:47
@gordonwoodhull gordonwoodhull force-pushed the feature/typst-books branch 2 times, most recently from 41d087b to 668a06f Compare January 28, 2026 15:46
@cderv
Copy link
Collaborator

cderv commented Jan 29, 2026

Closes #13954

Book projects can now render to Typst/PDF using the orange-book template.

Features:
- Chapter-based numbering for figures, tables, equations, theorems,
  callouts, and listings with counter reset at chapter boundaries
- Book parts and appendices with proper numbering (A, B, C...)
- Brand color and logo support via _brand.yml
- Table of contents with configurable depth
- List of figures/tables infrastructure
- Bibliography and citations with citeproc
- Subfigure support with hierarchical numbering
- Margin layout support for callouts

Extension system additions:
- Expose crossref.categories, quarto.doc.language, file_metadata_filter,
  and combineFilters to extensions
- Auto-load orange-book extension for Typst book projects
- Support for extension-provided typst-show.typ and numbering.typ partials

Includes orange-book test suite with cross-reference, citation, notebook
embedding, and margin layout integration tests.
Enhancements to PDF text position assertions:
- Aggregate all regex mismatches and report together instead of failing
  on first error
- Add granularity attribute to compare positions at ancestor structure
  elements (e.g., Div, P) rather than individual text spans
- Include page number in position assertion failures
- Fix duplicate error reporting for ambiguous text matches

Test runner fixes:
- Fix --keep-outputs flag for book projects
- Fix book output path detection for multi-file vs single-file formats
Command-line tool that displays the PDF tag tree structure with marked
content IDs (MCIDs) and associated text. Useful for debugging PDF
accessibility structure and understanding how content is tagged.

Features:
- Search all pages for text patterns
- Highlight matching structure elements
- Show MCID mappings and bounding boxes
Remove version auto-detection from prepare-dist.ts and require explicit
version parameter. Updates performance-check and test-bundle workflows
to pass the version from version.txt.
Ignore .quarto cache directories which are populated at render time.
Also add gitignore entries for book test directories.
Simplify the logic for resolving user filter script paths. The previous
code had redundant checks and incorrect path resolution for filters
specified with scriptFile in _extension.yml.
Bundle fontawesome, octique, showybox, and theorion packages from
Typst preview repository. These are copied to .quarto cache at render
time, enabling offline builds without network access to typst.app.
… commit d39d268a9

git-subtree-dir: src/resources/extension-subtrees/orange-book
git-subtree-split: d39d268a93a8e14518b59a2be05893f0a8943aef
@gordonwoodhull gordonwoodhull merged commit 6645d55 into main Jan 29, 2026
51 checks passed
@gordonwoodhull gordonwoodhull deleted the feature/typst-books branch January 29, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature request: typst books

4 participants